package com.alibaba.weex.module;

import com.nat.device_battery.HLBatteryModule;
import com.nat.device_battery.HLModuleResultListener;
import com.taobao.weex.annotation.JSMethod;
import com.taobao.weex.bridge.JSCallback;
import com.taobao.weex.common.WXModule;


/**
* 电池模块
*
* @version 1.0
* @since 2017/7/2
*/
public class DeviceBatteryModule extends WXModule{

    @JSMethod
    public void status(final JSCallback jsCallback){
        HLBatteryModule.getInstance(mWXSDKInstance.getContext()).status(new HLModuleResultListener() {
            @Override
            public void onResult(Object o) {
                jsCallback.invoke(o);
            }
        });
    }
}
